{% extends "layouts/default.html.twig" %}

{% block title %}{{ 'Directors'|trans }}{% endblock %}

{% block body %}
    <div class="container-fluid">

        {{ include('partials/_page_header.html.twig', {header: 'Directors'|trans, description: 'Bacula director(s) overview'|trans }) }}

        <p>Found {{ directors_count }} Bacula director catalog(s) in your configuration</p>

        <div class="row">
            {% for director in directors %}
                <div class="col-4">
                    <div class="card border-dark m-3">
                        <div class="card-body">
                            <h4 class="card-title">{{ director.label }}</h4>
                            <p class="card-text">{{ director.description }}</p>

                            {% if director.error is defined %}
                                <p class="text-danger"><b>Error:</b> {{ director.error }}</p>
                            {% endif %}

                            <hr>
                            <h5 class="card-title">{{ 'Client(s)'|trans }}</h5>
                            <p class="card-text">{{ director.clients }}</p>

                            <h5 class="card-title">{{ 'Jobs'|trans }}</h5>
                            <p class="card-text">{{ director.jobs }}</p>

                            <h5 class="card-title">{{ 'Total bytes'|trans }}</h5>
                            <p class="card-text">{{ director.totalbytes }}</p>

                            <h5 class="card-title">{{ 'Total files'|trans }}</h5>
                            <p class="card-text">{{ director.totalfiles }}</p>

                            <h5 class="card-title">{{ 'Database size'|trans }}</h5>
                            <p class="card-text">{{ director.dbsize }}</p>

                            <h5 class="card-title">{{ 'Volume(s)'|trans }}</h5>
                            <p class="card-text">{{ director.volumes }}</p>

                            <h5 class="card-title">{{ 'Volume(s) size'|trans }}</h5>
                            <p class="card-text">{{ director.volumesize }}</p>

                            <h5 class="card-title">{{ 'Pool(s)'|trans }}</h5>
                            <p class="card-text">{{ director.pools }}</p>

                            <h5 class="card-title">{{ 'FileSet(s)'|trans }}</h5>
                            <p class="card-text">{{ director.filesets }}</p>
                        </div>
                    </div>

                </div>
            {% endfor %}
        </div>
    </div>
{% endblock %}